
{% extends 'base_main.html' %}

{% block title%}
    爱家-注册
{% endblock %}

{% block css %}
    <link href="/static/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="/static/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link href="/static/css/reset.css" rel="stylesheet">
    <link href="/static/css/ihome/main.css" rel="stylesheet">
    <link href="/static/css/ihome/register.css" rel="stylesheet">
{% endblock %}

{% block content %}
    <div class="container">
        <div class="logo-bar"><a href="{{ url_for('home.index') }}"><img src="/static/images/logo@128x59.png"></a></div>
        <form action="" class="form-register" method="post">
            <div class="form-group form-group-lg">
                <div class="input-group">
                    <div class="input-group-addon"><i class="fa fa-mobile fa-2x fa-fw"></i></div>
                    <input type="number" class="form-control" name="mobile" id="mobile" placeholder="手机号">
                </div>
            </div>
            <div class="error-msg" id="mobile-err"><i class="fa fa-exclamation-circle"></i><span></span></div>

            <div class="form-group form-group-lg">
                <div class="input-group">
                    <div class="input-group-addon"><i class="fa fa-image fa-lg fa-fw"></i></div>
                    <input type="text" class="form-control" name="imagecode" id="imagecode" placeholder="图片验证码">
                    <div class="input-group-addon image-code" onclick="generateImageCode();">
                        <canvas  width="100px" height="41px"  id="verifyCanvas"></canvas>
                        <img id="code_img">
                    </div>
                </div>
            </div>
            <div class="error-msg" id="image-code-err"><i class="fa fa-exclamation-circle"></i><span></span></div>

            <div class="form-group form-group-lg">
                <div class="input-group">
                    <div class="input-group-addon"><i class="fa fa-lock fa-lg fa-fw"></i></div>
                    <input type="password" class="form-control" name="password" id="password" placeholder="密码">
                </div>
            </div>
            <div class="error-msg" id="password-err"><i class="fa fa-exclamation-circle"></i><span></span></div>

            <div class="form-group form-group-lg">
                <div class="input-group">
                    <div class="input-group-addon"><i class="fa fa-lock fa-lg fa-fw"></i></div>
                    <input type="password" class="form-control" name="password2" id="password2" placeholder="确认密码">
                </div>
            </div>
            <div class="error-msg" id="password2-err"><i class="fa fa-exclamation-circle"></i><span></span></div>

            <button type="submit" class="btn btn-lg btn-theme btn-block">立即注册</button>
            <!--<input class="btn btn-lg btn-theme btn-block" type="submit" value="注册">-->
            <p class="login-a">已有账号，<a href="{{ url_for('user.login') }}">立即登陆</a></p>
        </form>

    </form>

    </div>
{% endblock %}

{% block js %}
    <script src="/static/js/jquery.min.js"></script>
    <script src="/static/plugins/bootstrap/js/bootstrap.min.js"></script>
    <script src="/static/js/ihome/register.js"></script>
{% endblock %}